package cc.cix.gt.org.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author cix
 */
@Data
@ApiModel(value = "Dept对象", description = "部门")
@TableName("t_dept")
public class Dept implements Serializable {

    private static long serialVersionUID = -7790334862410409053L;

    /**
     * 顶级 ID
     */
    public static Long TOP_DEPT_ID = 0L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("部门 ID")
    private Long id;

    @ApiModelProperty("父级 ID")
    private Long parentId;

    @TableField(condition = SqlCondition.LIKE)
    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("排序")
    private Integer orderNum;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;

}
